and how is it used to train feed forward neural networks